home *** CD-ROM | disk | FTP | other *** search
- #ifdef MODE_X
-
- /*
- xxxxADDR defines the base port number used to access VGA component xxxx,
- and is defined for xxxx =
- ATTRCON - Attribute Controller
- MISC - Miscellaneous Register
- VGAENABLE - VGA Enable Register
- SEQ - Sequencer
- GRACON - Graphics Controller
- CRTC - Cathode Ray Tube Controller
- STATUS - Status Register
- */
-
- #define ATTRCON_ADDR 0x3c0
- #define MISC_ADDR 0x3c2
- #define VGAENABLE_ADDR 0x3c3
- #define SEQ_ADDR 0x3c4
- #define GRACON_ADDR 0x3ce
- #define CRTC_ADDR 0x3d4
- #define STATUS_ADDR 0x3da
-
-
- /*
- Note that the following C definition of Register is not compatible
- with the C++ definition used in the source code of TWEAK itself!
- */
-
- typedef struct
- {
- unsigned port;
- unsigned char index;
- unsigned char value;
- } Register;
-
- typedef Register *RegisterPtr;
-
- void readyVgaRegs(void);
- void outRegArray(Register *r, int n);
- void outReg(Register r);
-
- void sX_SetPixel( short x, short y, char color );
-
- #endif
-
-
- BOOL s_SetVideoMode( WORD vidMode );
- BOOL s_Init();
- BOOL s_UnInit( BOOL bDeleteMaps );
- BOOL s_Clear( BYTE fillWith );
- BOOL s_ClearHalf( BYTE fillWith );
-
- // Blits only the region of the offscreen buffer to a position on the screen.
- BOOL s_DrawRegion( DWORD x1, DWORD y1, DWORD x2, DWORD y2, DWORD destX, DWORD destY );
-
- // Blits the entire offscreen buffer.
- BOOL s_Draw();
-
- void ResetVideoMode(WORD mode);
-
- void s_BlitChar(int xc,int yc,char c,int color,int trans_flag);
- void s_BlitString(int x,int y,int color, char *string,int trans_flag);
-
-
- #ifdef DOS
- BOOL s_SetPalette( char *palette );
- BOOL s_Alert( char *message );
-
- void s_SetMode( char modeNum );
- char s_GetMode();
-
- void s_WaitForRetrace();
- #endif
-
- // Assembler functions.
- void s_ScreenBlit( BYTE *pDest, BYTE *pSource, WORD nDWords );
- void s_DWordMemSet( BYTE *pDest, BYTE fillWith, DWORD numDWords );
-
- BOOL s_SetPaletteMaps();
-
- // Stupid quick functions for when I get lazy (they check boundaries).
- BOOL s_SetPixel( WORD x, WORD y, BYTE color );
-
-